package com.example.its2021606134chh.TrafficViolationModule;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

/**
 * @ClassName: CarSQLiteOpenHelper$
 * @Description: 作用
 * @Author: letquit
 * @CreateDate: 9/8/2021$
 * @Version: 1.0
 */
public class CarSQLiteOpenHelper extends SQLiteOpenHelper {
    public CarSQLiteOpenHelper(@Nullable Context context, @Nullable String name, @Nullable SQLiteDatabase.CursorFactory factory, int version) {
        super(context, name, factory, version);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
//                        {"id":1,"carnumber":"鲁B10001","pdatetime":"2016-05-21 16:19:23.0","paddr":"北京路"},
        String sql="create table carpeccancy(id integer primary key ,carnumber varchar not null, pdatetime varchar, paddr varchar)";
        db.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
